﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;


namespace Sole
{
    public class BackgroundManager
    {
        //Dictionary<string, Background> scenerys;
        //Dictionary<string, Background> backgrounds;
        //Dictionary<string, Background> foregrounds;

        //List<Background> backgrounds;

        /*
        public void addScenery(string id, Background background)
        {
            scenerys.Add(id, background);
        }
        */
        /*
        public void addBackground(Background background)
        {
            backgrounds.Add(background);
        }
         */
        /*
        public void addForeground(string id, Background background)
        {
            foregrounds.Add(id, background);
        }
        */
        public BackgroundManager()
        {
            // scenerys = null;
            //backgrounds = null;
            // foregrounds = null;
        }

        protected void LoadContent()
        {
        }

        public void Update(GameTime gameTime, List<Background> backgrounds)
        {

            foreach (Background bgs in backgrounds)
            {
                bgs.position.X += bgs.velocity.X;
            }


            //KeyValuePair<string, Background> bg;

            //if (backgrounds != null)
            //{

            /*

                if (bg.Value.Visible == true)
                {
                    bg.Value.Draw(gameTime);
                   // bg.Value.position.X += bg.Value.position.X;
                    //bg.Value.position.Y += bg.Value.position.Y;
                    //lägg till if för att kolla pos, setta om bool onScreen    
                }
            */
            //}

            /*
            foreach (KeyValuePair<string, Background> bg in backgrounds)
            {
                bg.Value.Draw(gameTime);
            }
            */

        }
    }
}
